#!/bin/bash

if [ $# -lt 1 ];then
    echo "usge: common count"
    exit
fi

path=$PWD
count=$1

if [ $count -gt 1000 ];then
    while [ 1 ]
    do
        $path/../node_modules/mocha/bin/mocha test_client.js
        echo $count
    done
else
    i=0
    while [ $i -lt $count ]
    do
        $path/../node_modules/mocha/bin/mocha test_client.js
        let i++
    done
fi

